<!--复选框-->
<form action="" method="post">
    <input type="checkbox" name = 'q[]' value="small"> 小姑娘
    <input type="checkbox" name="q[]" value="big">大姑娘
    <input type="checkbox" name="q[]" value="hua">花姑娘
    <input type="submit" value="提交">
</form>
<?php
$q = isset($_POST['q'])?($_POST['q']):'';
if(is_array($q)) {
    $girl = array(
        'small' => '小姑娘',
        'big' => '大姑娘',
        'hua' => '花姑娘'
    );

    foreach ($q as $value) {
        echo $girl[$value].PHP_EOL;
    }
}
?>